feat(format): add core:columns-rows formatter for HQL table output - #78
Merged
Conversation
Enable --format table/csv/tsv on execute hql:run by expanding the
standard {columns, rows} query result shape through FormatArrayOutput,
and register a reusable core:columns-rows text formatter for others.
Co-authored-by: Cursor <cursoragent@cursor.com>
Preserve unique generated column IDs, enforce raw JSON semantics, and surface truncation in human-readable table output while covering empty and raw result paths. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Author
|
Addressed all review findings in 0e914a7:
|
…format that can be consumed by the list formatting code
… case in FormatSingleOutput
…xt so short descriptions dont wrap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
core:columns-rowstext formatter andExpandColumnsRowshelpers for the standard{columns, rows}query result shape--format table|csv|tsv|markdown|jsonlthroughFormatArrayOutputwhen execute/get payloads match that shapeexecute hql:runto use the new formatter so tabular output works out of the boxTest plan
go test ./pkg/format/ ./pkg/registry/go build -o bin/harness ./cmd/harness/./bin/harness execute hql:run --query 'find entity "platform:project" | select {name} | limit 5' --format table--format csv--format tableMade with Cursor